package cn.edu.nuc.bre.entity;

import java.io.Serializable;

/**
 * 部门
 * @author 王凯
 *
 */
public class Dept implements Serializable {
	
	/**
	 * 序列化id
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 部门id（自动生成）
	 */
    private String deptid;

    /**
     * 部门名称
     */
    private String dname;

    /**
     * 部门描述
     */
    private String ddesc;

    /**
     * 部门地址
     */
    private String daddress;

    /**
     * 部门状态
     */
    private Integer dstate;

    /**
     * 部门级别
     */
    private Integer dlevel;

    /**
     * 部门电话
     */
    private String dphone;

    public String getDeptid() {
        return deptid;
    }

    public void setDeptid(String deptid) {
        this.deptid = deptid;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public String getDdesc() {
        return ddesc;
    }

    public void setDdesc(String ddesc) {
        this.ddesc = ddesc;
    }

    public String getDaddress() {
        return daddress;
    }

    public void setDaddress(String daddress) {
        this.daddress = daddress;
    }

    public Integer getDstate() {
        return dstate;
    }

    public void setDstate(Integer dstate) {
        this.dstate = dstate;
    }

    public Integer getDlevel() {
        return dlevel;
    }

    public void setDlevel(Integer dlevel) {
        this.dlevel = dlevel;
    }

    public String getDphone() {
        return dphone;
    }

    public void setDphone(String dphone) {
        this.dphone = dphone;
    }

	@Override
	public String toString() {
		return "部门 [部门id=" + deptid 
				+ ", 部门名称=" + dname 
				+ ", 部门描述=" + ddesc 
				+ ", 部门地址=" + daddress
				+ ", 部门状态=" + dstate 
				+ ", 部门级别=" + dlevel 
				+ ", 部门电话=" + dphone + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((deptid == null) ? 0 : deptid.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Dept other = (Dept) obj;
		if (deptid == null) {
			if (other.deptid != null)
				return false;
		} else if (!deptid.equals(other.deptid))
			return false;
		return true;
	}

}